//
//  GameScene.m
//  Coffee
//
//  Created by sabhanayagam b on 4/29/11.
//  Copyright 2011 Cognizant. All rights reserved.
//

#import "GameScene.h"
#import "GameLayer.h"
#import "MGameStatusBar.h"
#import "MResumeGameLayer.h"
@implementation GameScene

// on "init" you need to initialize your instance
-(id) init
{
	// always call "super" init
	// Apple recommends to re-assign "self" with the "super" return value
	if( (self=[super init] )) {
		
		/*
		 //Adding BackGround
		 CCSprite* backGround = [CCSprite spriteWithFile:@"Sky BackGround.jpg"];
		 backGround.anchorPoint = ccp(0,0);
		 //position = CGPointMake(screenSize.width / 2, screenSize.height / 2);
		 [self addChild:backGround];
		 */
		 //Apply Back ground color
		CCLayerColor* colorLayer = [CCLayerColor layerWithColor:ccc4(255, 255, 255, 255)];
		[self addChild:colorLayer z:0];
		//Add Game Layer
		[self addChild:[GameLayer node] z:1 tag:LayerTagGameLayer];
		//Add Status Bar
		CCMultiplexLayer *menu = [CCMultiplexLayer layerWithLayers:[MGameStatusBar node] , [MResumeGameLayer node], nil];
		[self addChild:menu z:2 tag:LayerTagGameStatusBarLayer];
	
	}
	return self;
}


// on "dealloc" you need to release all your retained objects
- (void) dealloc
{
	// in case you have something to dealloc, do it in this method
	// in this particular example nothing needs to be released.
	// cocos2d will automatically release all the children (Label)
	
	// don't forget to call "super dealloc"
	[super dealloc];
}

@end
